<?php echo $this->fetch('header.html'); ?>
<?php echo $this->fetch('title.html'); ?>
<script type="text/javascript">
    $(function() {
        $('#login_form').validate({
            errorPlacement: function(error, element) {
                $(element).parent('td').append(error);
            },
            rules: {
                user_name: {
                    required: true
                },
                password: {
                    required: true
                },
                captcha: {
                    required: true,
                    remote: {
                        url: 'index.php?app=captcha&act=check_captcha',
                        type: 'get',
                        data: {
                            captcha: function() {
                                return $('#captcha1').val();
                            }
                        }
                    }
                }
            },
            messages: {
                user_name: {
                    required: '您必须提供一个用户名'
                },
                password: {
                    required: '您必须提供一个密码'
                },
                captcha: {
                    required: '请输入右侧图片中的文字',
                    remote: '验证码错误'
                }
            }
        });
    });
</script>


<div class="login_panel">
    <form class="login_box"  method="post" id="login_form">
        <table width="100%">
            <tr>
                <td>
                    <input placeholder="用户名(手机/邮箱)" type="text" name="user_name" class="text"/>
                </td>
            </tr>
            <tr> <td><label class="field_message"><span class="field_notice"></span></label></td></tr>
            <tr><td><input placeholder="密码" type="password" name="password"  class="text"/> </td> </tr>

            <?php if ($this->_var['captcha']): ?>
            <tr>
                <td class="relative"><input type="text" name="captcha" class="text" id="captcha1" placeholder="请输入图片中的文字,点击图片以更换"/>
                    <a href="javascript:change_captcha($('#captcha'));" class="renewedly"><img id="captcha" src="index.php?app=captcha&amp;<?php echo $this->_var['random_number']; ?>" /></a></td>
            </tr>
            <?php endif; ?>

            <tr> <td> <input  value="登录" name="Submit"  type="submit" class=" red_btn"/></td></tr>
            <input type="hidden" name="ret_url" value="<?php echo $this->_var['ret_url']; ?>" />
        </table>
        <p><a href="<?php echo url('app=member&act=register&ret_url=' . $this->_var['ret_url']. ''); ?>" >立即注册</a><a href="index.php?app=find_password&act=mobile" class="fr">手机找回密码</a></p>
        <p class="other"><a class="login_ico ico_qq" href="<?php echo url('app=third_login&act=qq'); ?>"></a><a class="login_ico ico_sina" href="<?php echo url('app=third_login&act=sina'); ?>"></a><a class="login_ico ico_wx" href="<?php echo url('app=third_login&act=wx'); ?>"></a></p>
    </form>
</div>


<?php echo $this->fetch('footer.html'); ?>